﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Database;
public partial class admin_HienthiHSX : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        var pm = new checkLogin();
        pm.redirectToLoginPage();
    }
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
         if (Convert.ToString(e.CommandArgument) == "dk")
            {
                HangSX hsx=new HangSX();
                int mahangsx = Convert.ToInt32(((HyperLink)e.Item.FindControl("hplMaHSX")).Text);
                //nv.XoaNV(manv);
                hsx.XoaNSX(mahangsx);
                LayDuLieu();
                Response.Redirect("HienthiHSX.aspx");
            }
            else
            {
                LayDuLieu();
            }
        }


    public void LayDuLieu()
    {


        PagedDataSource pgitems = new PagedDataSource();
        DataView dv = new DataView(HangSX.DSHSX().Tables[0]);
    }
}
